<div>
    <p class="basicInfo">
        远程日志上传
    </p>
    <el-tabs v-model="logType" style="padding-left: 20px;margin-top: 0!important;">
        <el-tab-pane label="实时日志" name="online">
            <el-row style="padding-left: 0">
                <div class="width100 d-flex a-center" style="flex-direction: column;">
                    <div style="display: inline-flex;width: 100%;">
                        <div style="display: inline-flex;justify-content: flex-end;align-items: center;text-align: center;flex:1">
                            <el-form-item  style="margin-bottom: 0" label="日志最大行数:" prop="onlineLogMaxLen" class="width25">
                                <el-input type="number" v-model="onlineLogMaxLen" placeholder=""
                                          oninput="if(value.length>10)value=value.slice(0,10)" min="10" step="10"
                                          max="5000" class="width100">
                                </el-input>
                            </el-form-item>
                            <el-form-item style="margin-bottom: 0" label="APP刷新:" prop="appSpace" class="width25">
                                <el-input type="number" v-model="appSpace" placeholder=""
                                          oninput="if(value.length>10)value=value.slice(0,10)" min="10" step="10"
                                          max="5000" class="width100">
                                </el-input>
                            </el-form-item>
                            <el-form-item  style="margin-bottom: 0" label="浏览器刷新:" prop="clientSpace" class="width25">
                                <el-input type="number" v-model="clientSpace" placeholder=""
                                          oninput="if(value.length>10)value=value.slice(0,10)" min="10" step="10"
                                          max="5000" class="width100">
                                </el-input>
                            </el-form-item>
                            <div class="width25 d-flex" style="justify-content: flex-end;">
                                <el-form-item  style="margin-bottom: 0;text-align: left;" label="实时日志类型:"  >
                                    <el-radio-group v-model="logDirectoryType" >
                                        <el-radio label="tools">
                                            工具箱日志
                                        </el-radio>
                                        <el-radio label="falsework">
                                            脚手架日志
                                        </el-radio>
                                    </el-radio-group>
                                </el-form-item>
                            </div>
                        </div>
                    </div>
                    <div style="display: inline-flex;width: 100%;justify-content: flex-end;margin-top: 10px;">
                            <div style="display: inline-flex;justify-content: flex-end;align-items: center;margin-left:10px;">
                                    <span>
                                        自动滚动到底部：
                                    </span>
                                <el-switch v-model="autoScroll"/>
                            </div>
                            <el-button type="danger" style="margin-left:10px" size="mini" @click.stop.prevent="startOnLineLog">
                                开启实时日志
                            </el-button>
                            <el-button type="primary" size="mini" style="margin-left:10px" id="stopOnLineLog"
                                       @click.stop.prevent="stopOnLineLog ">
                                停止实时日志
                            </el-button>
                    </div>
                    <div style="min-height: 40vh;display: flex;justify-content: flex-end;align-items: center;width: 100%;margin-top: 10px;">
                        <!--<el-input type="textarea" style="height: 70vh;" :rows="25" id="scroll_text" v-model="onlineLogContent"/>-->
                        <div id="logTextEditor" style="width: 100%;margin-top:10px;height: 500px;"></div>
                    </div>
                </div>
            </el-row>
        </el-tab-pane>
        <el-tab-pane label="全部日志" name="all">
            <el-row style="padding-left: 0">
                <div class="width100 d-flex a-start">
                    <el-form-item label="日志名称:" prop="logName" class="width100" label-width="72px">
                        <el-input v-model="remoteHandler.param2.logName" placeholder="请输入远程日志名称"
                                  class="width100" />
                    </el-form-item>
                </div>
            </el-row>
            <el-row style="padding-left: 0">
                <div class="width100 d-flex a-center" style="flex-direction: column;">
                    <div style="display: inline-flex;width: 100%;">
                        <div style="display: inline-flex;justify-content: flex-end;align-items: center;text-align: center;flex:1">
                            <el-button type="danger" style="margin-left:10px" size="mini" @click.stop.prevent="remoteLogUpload">
                                远程日志上传
                            </el-button>
                            <a href="remoteHandler.param2.previewLog" />
                            <!--<el-button type="primary" style="margin-left:10px" size="mini" @click.stop.prevent="downLoadLog">
                                日志下载
                            </el-button>-->
                            <el-button type="primary" size="mini" style="margin-left:10px" id="loadRemoteLog"
                                       @click.stop.prevent="loadPreviewLog">
                                加载日志
                            </el-button>
                        </div>
                    </div>
                    <div style="min-height: 40vh;display: flex;justify-content: flex-end;align-items: center;text-align: center;width: 100%;margin-top: 10px;">
                        <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" height="100%"
                                width="100%" style="height: 70vh;" allowtransparency="yes" v-if="remoteHandler.param2.previewLog"
                                id="previewLog" src="">
                        </iframe>
                        <div v-else style="font-size: 20px;color: rgba(29,140,128,0.29)">
                            暂无日志,请先发送指令,再加载日志
                        </div>
                    </div>
                </div>
            </el-row>
        </el-tab-pane>
    </el-tabs>
</div>